package qx.hyj.petrescue.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * (Favorite)实体类
 *
 * @author makejava
 * @since 2024-12-19 10:57:03
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Favorite implements Serializable {
    private static final long serialVersionUID = 477008492050261092L;
    /**
     * 唯一标识
     */
    private Integer id;
    /**
     * 收藏者id
     */
    private Integer fuser;
    /**
     * 博客ID
     */
    private Integer fblog;
    /**
     * 收藏时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")  //json序列化格式
    @JsonDeserialize(using = LocalDateTimeDeserializer.class) // 反序列化
    @JsonSerialize(using = LocalDateTimeSerializer.class)     // 序列化
    private LocalDateTime ftime;



}

